package com.sihai.ehr.service;

import com.sihai.core.Limit;
import com.sihai.core.LimitedList;
import com.sihai.core.Sorter;
import com.sihai.ehr.jdbc.Department;
import com.sihai.ehr.model.sys.AuditStatus;
import com.sihai.ehr.model.sys.Organization;
import com.sihai.ehr.model.sys.OrganizationAuditing;

import java.util.List;

/**
 * @author wxn
 * @since 12-5-24 1:12
 */
public interface OrganizationService {

    Organization get(Long id);

    LimitedList<Organization> search(Organization organization, Limit limit, Sorter sorter);

    void save(Organization organization);

    List<Organization> findChildren(Long parentId, boolean isAllField, Limit limit, Sorter sorter);

    List<Organization> findChildrenByTop(Long topId, Limit limit, Sorter sorter);

    LimitedList<Organization> findForAudit(Long topId, Limit limit, Sorter sorter);

    List<Organization> findAllChildren(boolean isAllField, Limit limit, Sorter sorter);

    List<List<OrganizationAuditing>> findOrganizationAuditing(Long organizationId);

    //创建一个审核流程
    void saveOrganizationAuditingProcess(Long organizationId);
    //查找所有分部门
    List<Organization> findAllChildren(Limit limit, Sorter sorter);

    void remove(Long organizationId)throws Exception;

    boolean initDepartmentDB()throws Exception;
}
